
import request from '@/utils/request'

export function getGoodsListInfo(params) {
  return request({
    url: '/vm-service/sku/search',
    method: 'GET',
    params
  })
}
// 获取商品类型信息
export function getGoodsTypeInfo(params) {
  return request({
    url: '/vm-service/skuClass/search',
    method: 'GET',
    params
  })
}
// 添加商品类型
export function addGoodsType(data) {
  return request({
    url: '/vm-service/skuClass',
    method: 'POST',
    data
  })
}

// 删除商品类型
export function delGoodsType(classId) {
  return request({
    url: '/vm-service/skuClass/' + classId,
    method: 'DELETE'
  })
}
// 修改商品类型
export function changeGoodsType(data) {
  return request({
    url: '/vm-service/skuClass/' + data.classId,
    method: 'PUT',
    data
  })
}
// 导入数据
export function importDataInfo(data) {
  return request({
    url: '/vm-service/sku/upload/' + data.fileName,
    method: 'POST',
    data
  })
}
// 添加商品
export function addGoodsInfo(data) {
  return request({
    url: '/vm-service/sku',
    method: 'POST',
    data
  })
}
// 修改商品
export function changeGoodsInfo(data) {
  return request({
    url: '/vm-service/sku/' + data.skuId,
    method: 'PUT',
    data
  })
}
